home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1999 #2
/
Amiga Plus CD - 1999 - No. 2.iso
/
System-Boost
/
Grafik
/
AmiCAD
/
ARexx_english
/
UPPERCASE.amiCAD
< prev
next >
Wrap
Text File
|
1998-06-17
|
1KB
|
60 lines
/* Conversion of a text object in UPPERCASE */
/* $VER: 1.02e (© R.Florac, 24 Mai 1998) */
options results
signal on error
signal on syntax
'OBJET=FIRSTSEL'; objet = result
if objet = 0 then do
'MESSAGE("There is no selected"+CHR(10)+"object")'
exit
end
'SAVEALL(-1)'
do while objet > 0 /* version 1.01 */
'TYPE(OBJET)'; type = result
'READTEXT(OBJET)'; texte = result
i = 1
l = length(texte)
do while i <= l
curletter = substr(texte, i, 1)
if curletter = ' ' then
do
i = i + 1
iterate
end
texte = overlay(upper(curletter), texte, i)
i = i + 1
end
select
when type = 4 then 'SETTEXT(OBJET,"'texte'")'
when type = 5 then 'SETTEXT(OBJET,"'texte'")'
when type = 6 then 'SETTEXT(OBJET,"'texte'")'
when type = 11 then 'SETTEXT(OBJET,"'texte'")'
when type = 12 then 'SETTEXT(OBJET,"'texte'")'
otherwise nop
end
'OBJET=NEXTSEL(OBJET)'; objet = result
if objet=0 then exit
end
exit
/* Traitement des erreurs, interruption du programme */
syntax:
erreur=RC
'MESSAGE("Script UPPERCASE.AmiCAD:"+CHR(10)+"Syntax error"+CHR(10)+"in line 'SIGL'"+CHR(10)+"'errortext(erreur)'")'
exit
error:
'MESSAGE("Script UPPERCASE.AmiCAD:"+CHR(10)+"Error in line 'SIGL'")'
exit